<?php


namespace app\admin\model;



class ApprovalModel extends BaseModel
{

    protected $name='approval';

    protected $autoWriteTimestamp = true;
    protected $updateTime = false;
    protected $createTime = 'apply_time';

    public static function addSave($form_type,$detail_type,$form_id,$order_id=0){

        $approval=[
            'form_type'=>$form_type,
            'form_id'=>$form_id,
            'detail_type'=>$detail_type,
            'apply_user'=>cmf_get_current_admin_id(),
            'apply_time'=>time(),
            'approval_status'=>1,
            'order_id'=>$order_id,
        ];

      return   self::insertGetId($approval);
    }

}